package com.hd.trans.share;


import java.util.ArrayList;
import java.util.List;

public class DownloadArg {
    private String taskId;
    private List<String> urlStr;
    private List<String> targetFileAbsPaths;

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public DownloadArg(String taskId, List<String> urlStr, List<String> targetFileAbsPaths) {
        this.taskId = taskId;
        this.urlStr = urlStr;
        this.targetFileAbsPaths = targetFileAbsPaths;
    }

    public List<String> getUrlStr() {
        return urlStr;
    }

    public void setUrlStr(List<String> urlStr) {
        this.urlStr = urlStr;
    }

    public List<String> getTargetFileAbsPaths() {
        return targetFileAbsPaths;
    }

    public void setTargetFileAbsPaths(List<String> targetFileAbsPaths) {
        this.targetFileAbsPaths = targetFileAbsPaths;
    }

    public void addFilePath(String filePath){
        if(targetFileAbsPaths == null){
            targetFileAbsPaths = new ArrayList<>();
        }
        targetFileAbsPaths.add(filePath);
    }

    @Override
    public String toString() {
        return "DownloadArg{" +
                "taskId='" + taskId + '\'' +
                ", urlStr=" + urlStr +
                ", targetFileAbsPaths=" + targetFileAbsPaths +
                '}';
    }
}
